﻿using System;
using System.Text.RegularExpressions;

class ExtractSentenceContainingWord
{
    static void Main()
    {
        string text = "We are living in a yellow submarine. We don't have anything else. Inside the submarine is very tight. So we are drinking all the day. We will move out of it in 5 days.";

        string word = "in";

        int count = 0;

        foreach (Match match in Regex.Matches(text, word, RegexOptions.IgnoreCase))
        {
            count++;
        }
    }
}